home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / lisp / wgdb-42.lha / wgdb-4.2 / libiberty / strerror.c < prev    next >
C/C++ Source or Header  |  1992-09-11  |  311b  |  14 lines

  1. /* Many systems don't have strerror, but some do.  This simulates
  2.    it for systems that have sys_errlist instead.  */
  3.  
  4. extern int sys_nerr;
  5. extern char *sys_errlist[];
  6.  
  7. char *
  8. strerror (code)
  9.      int code;
  10. {
  11.   return (((code < 0) || (code >= sys_nerr)) ? "(unknown error)" :
  12.           sys_errlist [code]);
  13. }
  14.